package com.yanqu.road.server.cmd.systemgroup;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.union.SystemGroupMatchProto;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.command.Command;
import com.yanqu.road.server.manger.systemgroup.CrossSystemGroupMgr;
import com.yanqu.road.server.protocol.Protocol;
import io.netty.channel.ChannelHandlerContext;

@Cmd(code = Protocol.S_CROSS_SYSTEM_SERVER_UPLOAD_ABILITY, desc = "上报区服强度")
public class Cross3NotifyServerUploadAbilityCmd implements Command {

    @Override
    public void execute(ChannelHandlerContext ctx, YanQuMessage yanQuMessage) throws Exception {

        SystemGroupMatchProto.Cross3NotifyServerUploadAbilityMsg msg = SystemGroupMatchProto.Cross3NotifyServerUploadAbilityMsg.parseFrom(yanQuMessage.getBytes());
        int systemId = msg.getSystemId();
        CrossSystemGroupMgr.uploadTodayServerUserAbility(systemId);
    }
}
